<?php
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'detail';
if($_RQ['op']=='detail'){
	$id=intval($_RQ['id']);
	if(!$id){
		exi('请选择课程','error','jy_kecheng/index/');
	}
	$this->session('id',$id);
	$params=array('uniacid'=>$_SESSION['uniacid'],'status'=>1,'id'=>$id);
	if($_RQ['keyword']){
		$params['title like']='%'.trim($_RQ['keyword']).'%';
	}
	$item=pdo_get('jy_kecheng_video_jieitem',$params);
	if($item['status']!=1){
		exi('该课程已经关闭！','error','jy_kecheng/index/');
	}
	$item['image']=tomedia($item['image']);
	$item['video']=tomedia($item['video']);
	$item['images']=json_decode($item['images'],true)?:array();
	$return['item']=$item;
	$return['isvideo']=intval($_RQ['isvideo']);
	$return['sharedata']=array(
		'title'=>$item['title']?$item['title']:'课程详情',
		'desc'=>$item['desc']?$item['desc']:'课程说明',
		'link'=>custom_url('jy_kecheng/video_detail//id='.$id,true),
		'imgUrl'=>tomedia($item['image']),
	);
	set_html('title',$item['title']);
	exi($return);
}

?>